//
//  LSAccountCoder.m
//  LookScore
//
//  Created by wr on 2018/1/17.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSAccountCoder.h"

@implementation LSAccountCoder
- (id)initWithCoder:(NSCoder *)aDecoder{
    self = [super init];
    if(self != nil){
        _Cid           = [aDecoder decodeObjectForKey:@"Cid"];
        _CreateTime    = [[aDecoder decodeObjectForKey:@"CreateTime"] longLongValue];
        _DisplayName   = [aDecoder decodeObjectForKey:@"DisplayName"];
        _UserHeadUrl   = [aDecoder decodeObjectForKey:@"UserHeadUrl"];
        _LoginName     = [aDecoder decodeObjectForKey:@"LoginName"];
        _Mobile        = [aDecoder decodeObjectForKey:@"Mobile"];
        _UserType      = [[aDecoder decodeObjectForKey:@"UserType"]intValue];
        _SpecialWords  = [aDecoder decodeObjectForKey:@"SpecialWords"];
        _FansCount     = [aDecoder decodeObjectForKey:@"FansCount"];
        _AttentionsCount     = [aDecoder decodeObjectForKey:@"AttentionsCount"];
        _TopicPublishCount   = [aDecoder decodeObjectForKey:@"TopicPublishCount"];
        _ModifyDisplayNameCount = [[aDecoder decodeObjectForKey:@"ModifyDisplayNameCount"] integerValue];
        _ModifyMobileCount = [[aDecoder decodeObjectForKey:@"ModifyMobileCount"] integerValue];
    }
    return self;
}

//归档时调用此方法
- (void)encodeWithCoder:(NSCoder *)aCoder{
    
    [aCoder encodeObject:_Cid forKey:@"Cid"];
    [aCoder encodeObject:[NSNumber numberWithLongLong:_CreateTime] forKey:@"CreateTime"];
    [aCoder encodeObject:_DisplayName forKey:@"DisplayName"];
    [aCoder encodeObject:_UserHeadUrl forKey:@"UserHeadUrl"];
    [aCoder encodeObject:_LoginName forKey:@"LoginName"];
    [aCoder encodeObject:_Mobile forKey:@"Mobile"];
    [aCoder encodeObject:[NSNumber numberWithInteger:_UserType] forKey:@"UserType"];
    [aCoder encodeObject:_SpecialWords forKey:@"SpecialWords"];
    [aCoder encodeObject:_FansCount forKey:@"FansCount"];
    [aCoder encodeObject:_AttentionsCount forKey:@"AttentionsCount"];
    [aCoder encodeObject:_TopicPublishCount forKey:@"TopicPublishCount"];
    [aCoder encodeObject:[NSNumber numberWithInteger:_ModifyDisplayNameCount] forKey:@"ModifyDisplayNameCount"];
    [aCoder encodeObject:[NSNumber numberWithInteger:_ModifyMobileCount] forKey:@"ModifyMobileCount"];
}

@end
